package com.kexun;



import java.util.TreeMap;

public class StringDemo02 {
    public static void main(String[] args) {
        //关于map集合,key值相同时,value值会被覆盖
        TreeMap<String, String> map = new TreeMap<>();
        map.put("a","夏明");
        map.put("a","王海东");
        map.put("b","胡歌");
        System.out.println(map);  //{a=王海东, b=胡歌}   map集合键不能重复
    }
}
